/*
 * tracedef.h
 *
 *  Created on: 2012/06/07
 *      Author: guanxiaoying
 */

#ifndef TRACEDEF_H_
#define TRACEDEF_H_
#include "typedef.h"
#include "Id.h"
#include "lib_func.h"
#include "core.h"
#include "../inc/trace.h"
#include "./memory/mem_interface.h"
#include "../inc/core_internal.h"
#include "../alert/alert.h"
#define TRACE_OBJECT_END 30

/**********[共用マクロ]**************************************************************/


#define	OPTID_MAXSHIFTWIDTH		116
#define	OPTID_TR_TEMP_VALUE		117
#define	OPTID_TR_FUNCRET_VALUE		118
#define	OPTID_TR_GBL_VALUE		119
#define	OPTID_TR_CONST_VALUE		110
#define	OPTID_TR_ONCE_LOOP		111
#define	OPTID_TR_UNREACHABLE		112
#define	OPTID_TR_PRECISE_PATH		113
#define	OPTID_TR_ARG2PARAM		114

typedef struct _TRACEOPTION{
	/* times for loop-tracing */
	UCHAR       ucLoopOption;
	/* judge whether the loop executes only once, and trace once if it does */
	UCHAR       ucDetectOnceLoop;
	/* record variables' values ? */
	UCHAR       ucRecordValue;
	/* go in the callee function's body? */
	UCHAR       ucCallFuncBody;
	/* call back: get the callee function for function-call command */
	U4          ulCmdEvent;
	/* call back: get the callee function for function-call command */
	AST	        (*pGetCallee)( AST );
	/* call back function: collect information. designed by user, and should not affect TRACE */
	S4	        (*pCallBackFunction)( AST, U4 );
}CMDTRACEOPTION;
extern CMDTRACEOPTION  stCmdTraceOption;

VOID TraceThrowWarning( U4 code, AST astCodeScp, PSZ pszParameter, ALERT_MSG_PARAM *szValue );
#endif /* TRACEDEF_H_ */
